﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Inheritance
{
    public enum AnimalSex
    {
        Male,
        Female
    }

    public class Animal
    {
        public Animal(String name, AnimalSex sex, int age)
        {
            this.Name = name;
            this.Age  = age;
            this.Sex  = sex;

            this.Id = Guid.NewGuid();
        }

        public Guid Id { get; protected set; }
        public String Name { get; protected set; }
        public AnimalSex Sex { get; protected set; }
        public int Age { get; protected set; }

        public bool? IsRare { get; protected set; }

        public virtual void PrintInfoToConsole()
        {
            Console.WriteLine(this.Name + ":");
        }
    }

    public class Mammal: Animal
    {
        public Mammal(String name,AnimalSex sex,int age,float milkVolume)
            :base(name,sex,age)
        {
            this.MilkVolume = milkVolume;
        }

        public override void PrintInfoToConsole()
        {
             base.PrintInfoToConsole();
            //Console.WriteLine("Я млекопитающее");
            //Console.WriteLine("=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=");
        }

        public float MilkVolume { get; set; }
    }

    public class Bird : Animal
    {
        public Bird(String name, AnimalSex sex, int age,int span)
            :base(name,sex,age)
        {
            this.Span = span;
        }

        public override void PrintInfoToConsole()
        {
            base.PrintInfoToConsole();
            //Console.WriteLine("Я птица");
            //Console.WriteLine("=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=");
        }

        public int Span { get; set; }
    }

    public class Fish : Animal
    {
        public Fish(String name, AnimalSex sex, int age,int finsNumber)
            :base(name,sex,age)
        {
            this.NumberOfFins = finsNumber;
        }

        public int NumberOfFins { get; set; }

        public void PrintFish()
        {
        }

        public override void PrintInfoToConsole()
        {
            //base.PrintInfoToConsole();
            Console.WriteLine("Я рыба");
            Console.WriteLine("=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=");
        }
    }
}
